/*********************\
 * file:     Rectangle
 * version:  0.1a
 * package:  JnRTest
 *
 * author:   linus
 * team:     NexT
 * license:  -
\*********************/

package JnRTest;
import static org.lwjgl.opengl.GL11.*;

public class Rectangle {
    public int x,y,w,h;
    public Rectangle(int ax,int ay,int aw,int ah){
        x=ax;y=ay;w=aw;h=ah;
    }

    public void draw(){
        glPushMatrix();
        glTranslatef(x,y,0.0f);
        glColor3f(0.5f,0.5f,0.5f);
        glBegin(GL_QUADS);
            glTexCoord2f(0.0f,0.0f); glVertex2f(0.0f,0.0f);
            glTexCoord2f(1.0f,0.0f); glVertex2f(w,0.0f);
            glTexCoord2f(1.0f,1.0f); glVertex2f(w,h);
            glTexCoord2f(0.0f,1.0f); glVertex2f(0.0f,h);
        glEnd();
        glPopMatrix();
    }

}
